home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / misc / research.txt < prev    next >
Encoding:
Text File  |  2001-07-11  |  6.7 KB  |  214 lines

  1.      ____     ______  __  ___  _____    ____             __________
  2.     /   /    /  ___/  \ \/  / /     \  /    \    ____   /___   ___/
  3.    /   /__  /  /__     \   / /  <>  / /  __  \  /    \     /  / 
  4.   /   ___/ /   __/     /  / /     _/  \      / /  __  \   /  /
  5.  /    \   /   /__     /  / /  /\  \    \____/  \      /   \  \
  6. /__/\__\  \_____/    /__/  \_/  \__\            \____/     \__\
  7.  
  8. http://www.weownyourlives.forever
  9.  
  10.  
  11. RESEARCHING AN ATTACK by Mnemonic
  12. xkyller@hotmail.com
  13. 7/27/99
  14.  
  15. =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
  16.  KeyRoot KeyRoot KeyRoot KeyRoot KeyRoot KeyRoot
  17. =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
  18.  
  19. Contents:
  20.  
  21. 01 - Intro
  22. 02 - Web browsing
  23. 03 - Port scanning
  24. 04 - Determing the method of penetration
  25. 05 - Making the attack
  26. 06 - Ok that's it
  27.  
  28. =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
  29. Shouts to GRiDMAN for suggesting the topic to me
  30. =-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-==-=-=-=
  31.  
  32. 01 - Intro
  33.  
  34.     I don't know why it wasn't obvious for me to write about it earlier.
  35. Although I'm sure the major audience that will continue reading after the
  36. intro are script kiddies, I thought about it for a while and decided to go
  37. ahead with releasing it.  This white paper is geared towards people who want
  38. to single out a system and make an organized attack.  Rather than attacking
  39. a random system you found to be exploitable to a certain security flaw.  I
  40. hope I can be of some help to new security professionals or other hacker-type
  41. people or anyone else who breaks into systems.  When you plan on breaking
  42. into someone else's system just plan on paying the consequences if you get
  43. caught.  If you don't want to get caught take the necessary precautions.
  44. You still might get caught.
  45.  
  46. =-=-=-=-=-=-=-=-=-=
  47.  
  48. 02 - Web browsing
  49.  
  50.     After you know what system you're attacking you have to get some
  51. general information about the system like what platform are they running,
  52. what applications, things like that.  A lot of times you can do this just
  53. by looking through their site.  As you look through the take note of what
  54. it's running like if it says what operating system, what web server,
  55. firewall, administrative tools, or CGI scripts and remember what versions
  56. are being used either.  The difference between version 1.0 and 3.0 can be
  57. the difference between a possible attack and no attack.  FTP or telnet
  58. banners could also reveal information about the system.
  59.  
  60. =-=-=-=-=-=-=-=-=-=
  61.  
  62. 03 - Port scanning
  63.  
  64.     Port scanning is always a good idea whether you know anything at
  65. all about the system or not.  The results of a port scan can in many
  66. cases show you what operating system is being run.  For example a Unix
  67. machine wouldn't be running NetBIOS and an NT machine wouldn't be running
  68. mountd.  In addition to this, what Internet applications are being run
  69. provides different ways you can break in.  Like if you know that the
  70. system is Linux and is running qpop or nlock or some other exploit-able
  71. program then there's a possibility that you can penetrate the system that
  72. way.  You should keep a temporary log of all port scanning that you do so
  73. that you can use the information when you actually make your attack.  Here
  74. is an example of a very short port scan:
  75.  
  76. KeyRoot Port Scanner (KeyScan) v1.0 by Mnemonic
  77.  
  78. Scanning ip address 127.0.0.1 on ports 21, 23, 56
  79.  
  80. Scan started 3/6/2020 1:08 am
  81.  
  82. 127.0.0.1
  83.   21
  84.   23
  85.  
  86. Scan completed 3/6/2020 1:10 am
  87.  
  88. KeyRoot owns you
  89.  
  90. I just scanned three ports on my local machine.  Two of these ports were
  91. open (21 and 23).  I can pretty much assume that I am running FTP and telnet.
  92. Other types of scans can determine what applications are being run on
  93. specific ports.
  94.  
  95. =-=-=-=-=-=-=-=-=-=
  96.  
  97. 04 - Determining the method of penetration
  98.  
  99.     Now you should know just about everything you need in order to make
  100. an attack.  When you know what the system is running you basically know what
  101. it's vulnerable to.  You can run some publicly-available exploit, write your
  102. own exploit, or use publicly-known attacks to penetrate the system.  In many
  103. instances a system may be running programs that are exploitable only when
  104. you have an account on the system.  If that's the case you're going to need
  105. to get a shell some how like guessing someone's password or something like
  106. that.  Rooting the system means you have complete control over it.  You have
  107. administrator rights.
  108.  
  109. =-=-=-=-=-=-=-=-=-=
  110.  
  111. 05 - Making the attack
  112.  
  113.     Ok so now you know how to attack the system go do it.  In most cases
  114. when you're attacking a someone you need to be running the same platform as
  115. they are.  This isn't the case with null connections or with platform-to-
  116. anotherplatform exploits.
  117.  
  118. =-=-=-=-=-=-=-=-=-=
  119.  
  120. 06 - Ok that's it
  121.  
  122.     Ummmm... yeah... peace to all my bro's in on EFNet.  NtWaK0 and
  123. MostHateD and everyone else.
  124.  
  125. =-=-=-=-=-=-=-=-=-=
  126.  
  127. KeyRoot: living your life for you
  128.  
  129. =-=-=-=-=-=-=-=-=-=
  130.  
  131. 07 - KeyScan.c
  132.  
  133. -----cut-----
  134.  
  135. /*  KeyScan.c by Mnemonic is just a very simple port scanner
  136.      ____     ______  __  ___  _____    ____             __________
  137.     /   /    /  ___/  \ \/  / /     \  /    \    ____   /___   ___/
  138.    /   /__  /  /__     \   / /  <>  / /  __  \  /    \     /  / 
  139.   /   ___/ /   __/     /  / /     _/  \      / /  __  \   /  /
  140.  /    \   /   /__     /  / /  /\  \    \____/  \      /   \  \
  141. /__/\__\  \_____/    /__/  \_/  \__\            \____/     \__\
  142.  
  143. For Linux/FreeBSD
  144. */
  145.  
  146. #include <netdb.h>
  147. #include <netinet/in.h>
  148. #include <stdio.h>
  149. #include <string.h>
  150. #include <sys/socket.h>
  151. #include <sys/types.h>
  152.  
  153. #define p0rt putaportnumberherethatyouwanttocheck
  154.  
  155. int x, s;
  156. char *str = "KeyScan v1.0 by Mnemonic";
  157. struct sockaddr_in addr, spoofedaddr;
  158. struct hostent *host;
  159.  
  160.  
  161. int openthesock(int sock, char *target, int port) {
  162.   struct sockaddr_in blah;
  163.   struct hostent *he;
  164.   bzero((char *)&blah, sizeof(blah));
  165.   blah.sin_family=AF_INET;
  166.   blah.sin_addr.s_addr=inet_addr(target);
  167.   blah.sin_port=htons(port);
  168.  
  169.  
  170.   if ((he = gethostbyname(target)) != NULL) {
  171.     bcopy(he->h_addr, (char *)&blah.sin_addr, he->h_length);
  172.   }
  173.  
  174.   else {
  175.     if ((blah.sin_addr.s_addr = inet_addr(server)) < 0) {
  176.       perror("gethostbyname()");
  177.       return(-3);
  178.     }
  179.   }
  180.  
  181.     if (connect(sock,(struct sockaddr *)&blah,16)==-1) {
  182.       close(sock);
  183.       return(-4);
  184.     }
  185.  
  186.   return;
  187. }
  188.  
  189.  
  190. void main(int argc, char *argv[]) {
  191.  
  192.   printf("\n\nKeyRoot Port Scanner (KeyScan) v1.0 by Mnemonic\n\n");
  193.   printf("Scanning ip address ", target, " on port ", p0rt);
  194.   printf("\n\nScan started about five seconds ago hehehehe");
  195.   printf("\n\n", target);
  196.  
  197.     if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) {
  198.       printf("\n\nScan completed\n\n");
  199.       printf("KeyRoot owns you");
  200.       exit(-1);
  201.     }
  202.  
  203.   openthesock(s, argv[1], p0rt);
  204.  
  205.   printf("\n  ", p0rt);
  206.   printf("\n\nScan completed\n\n");
  207.  
  208.   send(s,str,strlen(str));
  209.   usleep(100000);
  210.   close(s);
  211.   printf("KeyRoot owns you");
  212. }
  213.  
  214. -----cut-----